PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


RegisterAppearanceClient

Registers your program with the Appearance Manager.

pascal OSStatus RegisterAppearanceClient (void);
function result
A result code. The result code appearanceProcessRegisteredErr indicates that your program was already registered when you called the RegisterAppearanceClient function. For other possible result codes, see Result Codes .
DISCUSSION

The RegisterAppearanceClient function must be called at the beginning of your program, prior to initializing or drawing any onscreen elements or invoking any definition functions, such as the menu bar.

You should call RegisterAppearanceClient in order to receive Appearance Manager Apple events. Under Appearance Manager 1.1 and later, when the user changes the current appearance (that is, when a theme switch occurs), the Appearance Manager sends Apple events to all running applications that are registered as clients of the Appearance Manager and which are high-level event aware. Because typical results of a theme switch might include a change in menu bar height or window structure dimensions, as well as changes to the system fonts, colors, and patterns currently in use, you should listen for and respond to the Appearance Manager Apple events under most circumstances. See Appearance Manager Apple Event Constants for more details.

When your program calls RegisterAppearanceClient , the Appearance Manager also automatically maps standard pre-Appearance Manager definition functions to their theme-compliant equivalents for your program, whether or not systemwide appearance is active; see Definition Function Mapping and Program Registration for more details on this process.

VERSION NOTES

Available with Appearance Manager 1.0 and later.

SEE ALSO

The function UnregisterAppearanceClient .


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)